/*
 * @Description: text
 * @LastEditors: 蔡霸霸
 * @LastEditTime: 2021-02-28 09:49:54
 */
import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// import locale from "element-ui/lib/locale/lang/en"; // lang i18n

import "@/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control

// import echarts from  'echarts'
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;

import Moment from "moment";
Vue.prototype.$moment = Moment;

// 定义全局时间戳过滤器
Vue.filter("formatDate", function(value) {
  return Moment(value).format("YYYY-MM-DD HH:mm:ss");
});
/**
 * 在组件里使用
<div class="time">{{item.rateTime | formatDate}}</div>
 */

/**
 * If you don't want to use mock-server
 * you want to use mockjs for request interception
 * you can execute:
 *
 * import { mockXHR } from '../mock'
 * mockXHR()
 */

// set ElementUI lang to EN
Vue.use(ElementUI/* , { locale } */);

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
});
